﻿<Window x:Class="XAMLStylePad.XAMLStylePadMainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:view="clr-namespace:XAMLStylePad.Views"
        xmlns:viewmodel="clr-namespace:XAMLStylePad.ViewModels"
        xmlns:local="clr-namespace:XAMLStylePad"
        Title="XAMLStylePad"
        Icon="images/AppIcon.png"
        MinWidth="455" MinHeight="305">
    
    <!--<Window.Resources>
        <ResourceDictionary Source="Themes/AppResources.xaml"/>
    </Window.Resources>-->
    
    <!--<Window.Style>
        <Style TargetType="Window">
            <Setter Property="Icon" Value="{StaticResource AppIcon}"/>
        </Style>
    </Window.Style>-->

    <DockPanel LastChildFill="True">
        <Menu x:Name="menu" Height="20" DockPanel.Dock="Top"/>
        <Grid Margin="4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="20*" MinWidth="150"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="100*" MinWidth="300"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40*" MinHeight="100"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="60*" MinHeight="200"/>
            </Grid.RowDefinitions>
            
            <Border Grid.Column="0" Grid.RowSpan="3" 
                    Style="{StaticResource bordered}">
                <view:StylePadTree x:Name="tree"
                                   BorderThickness="0"
                                   SelectedItemChanged="tree_SelectedItemChanged"/>
            </Border>
            
            <GridSplitter Grid.Column="1" Grid.RowSpan="3"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Stretch"
                          ShowsPreview="True"
                          Width="4"/>

            <Border Grid.Column="2" Grid.Row="0" 
                    Style="{StaticResource bordered}">
                <view:PreviewPanel x:Name="preview" />
                
            </Border>
            
            <GridSplitter Grid.Row="1" Grid.Column="2"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Center"
                          ShowsPreview="True"
                          Height="4"/>

            <Border Grid.Column="2" Grid.Row="2" 
                Style="{StaticResource bordered}">
                <view:XAMLEditor x:Name="txXaml" 
                                 IsReadOnly="True" 
                                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                                 BorderThickness="0"/>
            </Border>
        </Grid>
    </DockPanel>
</Window>
